<template>
    <div>
        <answer></answer>
        <!-- <p>
          <button type="primary" @click="jmpToSettlement">完成对战（结算）</button>
        </p> -->
    </div>
</template>

<script>
import answer from '@/components/answer'
export default {
  data: {
    code: ''
  },
  components: {
    answer
  },
  methods: {
    jmpToSettlement () {
      wx.reLaunch({
        url: '../settlement/main'
      })
    },
    welogin () {
      var that = this
      wx.login({
        success (res) {
          if (res.code) {
            // 发起网络请求
            // wx.request({
            //   url: 'https://172.16.34.149/api/wechat',
            //   data: {
            //     code: res.code
            //   },
            //   method: 'POST'
            // })
            that.code = res.code
            that.test()
          } else {
            console.log('登录失败！' + res.errMsg)
          }
          console.log(res.code)
        }
      })
    }
  }
}
</script>

<style>
h6{
    color: blue
}
</style>
